package com.huilian.iotbox.data.service.impl;

import com.huilian.iotbox.data.dao.CommodityStockItemCommonDao;
import com.huilian.iotbox.data.dto.CommodityStockItemDto;
import com.huilian.iotbox.data.service.CommodityStockItemCommonService;
import com.huilian.iotbox.data.vo.CommodityStockItemVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CommodityStockItemCommonServiceImpl implements CommodityStockItemCommonService {
    @Autowired
    private CommodityStockItemCommonDao commodityStockItemDao;

    @Override
    public CommodityStockItemVo findCommoditySupplierId(CommodityStockItemDto commodityStockDto) {
        return commodityStockItemDao.findCommoditySupplierId(commodityStockDto);
    }

    @Override
    public int add(CommodityStockItemDto commodityStockDto) {
        return commodityStockItemDao.add(commodityStockDto);
    }

    @Override
    public int updateCostPrice(CommodityStockItemDto commodityStockDto) {
        return commodityStockItemDao.updateCostPrice(commodityStockDto);
    }

    @Override
    public List<CommodityStockItemVo> findCommodityBySupplierId(CommodityStockItemDto commodityStockDto) {
        return commodityStockItemDao.findCommodityBySupplierId(commodityStockDto);
    }
}
